package com.chen.controller;

import com.chen.pojo.vo.StatusReportVo;
import com.chen.service.StatusService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author chen
 * @version 1.0
 * @create_date 2025/8/21
 * 故障设备管理
 */
@Slf4j
@RestController
@RequestMapping("/api/status-service/status")
public class StatusController {
    @Autowired
    private StatusService service;

    /**
     * 获取10个故障设备列表
     *
     * @return 结果
     */
    @GetMapping("/top10")
    public List<StatusReportVo> getTop10() {
        return service.getTop10();
    }
}
